#!/bin/bash
if [ $# -ne 3  ]
then
    echo "Usage: x60cmOneSingleField.sh prefix ra dec"
    echo "prefix is the first 14 character of the fits name, like M151016_C00027 "
    exit 0
fi

otid=$1
ra=$2
dec=$3
fitfilelist=`echo $otid | awk '{print($1"*.fits")}'`
ls $fitfilelist >list
for Fitfile in `cat list`
do
    echo $Fitfile
    x60cm.sh $Fitfile $ra $dec
done
